<include file="public@header" />
<style type="text/css">
    .cardBox {
        width: 250px;
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
        text-align: center;
        float: left;
        margin-right: 10px;
        padding: 5px;
        padding-top: 15px;
    }

    .headerBox {
        color: #fff;
        padding: 10px;
        font-size: 15px;
        height: 100px;
    }

    .bodyBox {
        padding: 10px;
    }

    .bodyBox p {
        margin-left: 5px;
    }
</style>

</head>

<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li class="active"><a>生活费发放</a></li>
            <li><a href="{:url('life/add',array('id'=>$id))}">班组</a></li>
            <li><a href="{:url('life/addsup',array('id'=>$id))}">供货商</a></li>
        </ul>

        <form class="well form-inline js-ajax-form margin-top-20" method="post" action="{:url('Search')}">
            支付方式:
            <select name="status" class="form-control">
                <option value=""></option>
                <option value="1">备用金</option>
                <option value="2">公司付</option>
            </select>
            <input type="hidden" name="id" value="{$id}">
            <!--        <input   type="text" class="form-control" name="type" style="width: 120px;"-->
            <!--               value="{:input('request.user_login/s','')}" placeholder="请输入{:lang('USERNAME')}">-->
            <button type="submit" class="btn btn-primary ">搜索</button>
            <a class="btn btn-danger" href="">清空</a>
        </form>

        <div class="cardBox" style="margin-bottom: 60px">
            <div class="headerBox" style="background-color: #006fc4;">
                <p>
                    总支出 : {$all}
                </p>
                <p>
                    班组总支出 :{$lea}
                </p>
                <p>
                    供应商总支出 : {$sup}
                </p>

            </div>
        </div>

        <form method="post" class="js-ajax-form margin-top-20">

            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th>班组/供应商</th>
                        <th>{:lang('ACTIONS')}</th>
                    </tr>
                </thead>
                <tbody>
                    <volist name="res" id="v">
                        <tr>
                            <td>
                                <?php
                    if($v['type'] ==1){
                    echo '班组';
                    }else{
                    echo '供货商';
                    }
                ?>

                            </td>
                            <td>
                                <a class="btn btn-xs btn-primary js-ajax-submit"
                                    href="{:url('life/indexs',array('type'=>$v.type,'eid'=>$id))}">查看详情</a>
                            </td>
                        </tr>
                    </volist>

                </tbody>
            </table>

        </form>
    </div>
    <script src="__STATIC__/js/admin.js"></script>
</body>

</html>